package dao

import (
	"go-admin/src/module"
	"gorm.io/gorm"
)

var db *gorm.DB

func init(){
	db = module.GetDB()
	//db.AutoMigrate(&model.User{},&model.UserExtra{})
	//db.Model(&model.DomainGroup{}).Create([]map[string]interface{}{
	//	{"Name":"后台用户","ID":1,"STATUS":1},
	//	{"Name":"前台用户","ID":2,"STATUS":1},
	//})//建立用户组
	//db.Model(&model.UserGroup{}).Create([]map[string]interface{}{
	//	{"Name":"超级管理员","ID":1,"STATUS":1,"DomainGroupID":1},
	//	{"Name":"普通管理员","ID":2,"STATUS":1,"DomainGroupID":1},
	//	{"Name":"普通用户","ID":3,"STATUS":1,"DomainGroupID":2},
	//})//建立用户组
	//db.Create(&model.User{
	//	Username: "admin",
	//	Email: "admin@admin.com",
	//	Password: "admin888",
	//	UserGroupID: 1,
	//	UserExtra: model.UserExtra{
	//		NickName: "超级管理员",
	//		IP: "127.0.0.1",
	//		IdentifySTATUS: 2,
	//		IdentifyIntroduction: "本站超级管理员",
	//		Introduction: "我只是网站搬运工",
	//	},
	//})//建立用户
}